<p>
    <label *ngIf="option.label">{{option?.label}}</label>
    <ng-container *ngIf="!option.tooltip; else tooltipTemp">
        <ng-container *ngTemplateOutlet="inputTemp"> </ng-container>
    </ng-container>
    <span *ngIf="option.icon" class="{{option.icon}}"></span>
</p>

<ng-template #tooltipTemp>
    <div class="tooltip">
        <ng-container *ngTemplateOutlet="inputTemp"></ng-container>
        <nm-tooltip [option]="option.tooltip">
            <nm-button [option]="{icon:'icon-help-circle'}"></nm-button>
        </nm-tooltip>
    </div>
</ng-template>

<ng-template #inputTemp>
    <ng-container *ngIf="!form || (formOption&&formOption.type!='info'); else infoTemp">
        <input [type]="option.type" [placeholder]="option.placeholder" [required]="option.required" [(ngModel)]="value" />
    </ng-container>
</ng-template>

<ng-template #infoTemp>
    <span>{{value}}</span>
</ng-template>